const state = {
	statusBarHeight: 0,
	safeAreaBottom: 0
}

const mutations = {
	SET_BAR_HEIGHT: (state, data) => {
		state.statusBarHeight = data
	},
	SET_SAFE_AREA_BOTTOM: (state, data) => {
		state.safeAreaBottom = data
	}
}

const actions = {
	setBarHeight({
		commit
	}, data) {
		return new Promise(resolve => {
			commit("SET_BAR_HEIGHT", data)
			resolve(data)
		})
	},
	setSafeAreaBottom({
		commit
	}, data) {
		return new Promise(resolve => {
			commit("SET_SAFE_AREA_BOTTOM", data)
			resolve(data)
		})
	},
}


export default {
	namespaced: true,
	state,
	mutations,
	actions
}